package day7;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;

/**
 * @author oldliu
 * @since 1.0
 */
public class ObjTest {
    public static void main(String[] args) {
        try {
            Student stu=new Student("小东兴","hefei瑶海",21);
            ObjectOutputStream oin=new ObjectOutputStream(new FileOutputStream("stu.obj"));
            oin.writeObject(stu);
            oin.close();
            System.out.println("seri ok");
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
